//
//  YZFriendListCell1.m
//  VET
//
//  Created by lixiaoyi on 2018/7/12.
//  Copyright © 2018年 YZ. All rights reserved.
//

#import "YZFriendListCell1.h"
#import <UIImageView+WebCache.h>

@implementation YZFriendListCell1

#pragma mark - override
- (void)layouViews{
    [self.friendStateBtn setHidden:YES];
    [self.ignoreBtn setHidden:YES];
    UIView *superView = self.contentView;
    [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(superView.mas_left).with.offset(10);
        make.top.mas_equalTo(superView.mas_top).with.offset(12);
        make.right.mas_equalTo(self.nameLabel.mas_left).with.offset(-10);
        make.bottom.mas_equalTo(superView.mas_bottom).with.offset(-8);
        make.width.height.mas_equalTo(30);
    }];
    
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.iconImageView.mas_right).with.offset(10);
        make.top.mas_equalTo(superView.mas_top).with.offset(12);
        make.bottom.mas_equalTo(self.infoLabel.mas_top).with.offset(-6);
        make.width.mas_equalTo(200);
    }];
    
    [self.infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.nameLabel.mas_left);
        make.top.mas_equalTo(self.nameLabel.mas_bottom).with.offset(6);
        make.bottom.mas_equalTo(superView.mas_bottom).with.offset(-5);
        make.right.mas_equalTo(self.nameLabel.mas_right);
    }];
}


#pragma mark - setter
- (void)setModel:(YZFriendModel *)model {
    super.model = model;
    [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.iconName] placeholderImage:nil];
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
